﻿var newServiceProxy;
function pageLoad() {
    // Instantiate the service proxy
    newServiceProxy = new App_Code.UserService();
}

function SendRequest(newUserName) {
    newServiceProxy.CheckUserName(newUserName, OnComplete, OnError, OnTimeOut);
}

function OnComplete(arg) {
    alert(arg);
}

function OnTimeOut(arg) {
    alert("TimeOut has occurred");
}

function OnError(arg) {
    alert("Error" + arg.message);
}